package com.education.teach.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.education.teach.mvp.contract.CoursewareContract;
import com.education.teach.mvp.model.CoursewareModel;


@Module
public class CoursewareModule {
    private CoursewareContract.View view;

    /**
     * 构建CoursewareModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public CoursewareModule(CoursewareContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    CoursewareContract.View provideCoursewareView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    CoursewareContract.Model provideCoursewareModel(CoursewareModel model) {
        return model;
    }
}